package EventManager;

/**
 * A synchronized way of working with the model.. static a bottleneck.
 * @author Yury Kitaev
 *
 */
public class RequestProcessor 
{
	/**
	 * Processes user-level requests
	 * @param request
	 * @return
	 */
	public static synchronized Request process (Request request)
	{
		request.process();
		return request;
	}
	
	/**
	 * Processes admin requests
	 * @param request
	 * @param issuer
	 * @return
	 */
	public static synchronized AdminRequest process (AdminRequest request, Administrator issuer)
	{
		request.process(issuer);
		return request;
	}
}
